<%@ page contentType="text/jsp; charset=utf-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="thx" uri="/thx-tags" %>
<%@ taglib prefix="fun" uri="http://java.sun.com/jsp/jstl/functions" %>
<div class="modal-body">
	<section class="content">
		<div class = "nav-tabs-custom">
		    <!-- Nav tabs -->
		    <input type="hidden" id="appId" value="${entity.appId}"/>
		    <ul class="nav nav-tabs" role="tablist">
		        <li role="presentation" class="active" >
		            <a href="#base-info" aria-controls="home" load-url="${pageContext.request.contextPath}/workflow/appConfig!toBaseInfo.action?id=" role="tab" data-toggle="tab">
		                基本信息</a>
		        </li>
		        <li role="presentation" style="display:none">
		            <a href="#field-manage" aria-controls="profile"  load-url="${pageContext.request.contextPath}/workflow/field!list.action?appId=" role="tab" data-toggle="tab">
		            字段管理</a>
		        </li>
		           <li role="presentation" style="display:none">
		            <a href="#form-template" aria-controls="profile"  load-url="${pageContext.request.contextPath}/workflow/form!show.action?appId=" role="tab" data-toggle="tab">
		            表单模板</a>
		        </li>
		           <li role="presentation" style="display:none">
		            <a href="#field-auth" aria-controls="profile"  load-url="${pageContext.request.contextPath}/workflow/fieldOption!list.action?appId=" role="tab" data-toggle="tab">
		            字段读写性</a>
		        </li>
		        <li role="presentation"  style="display:none">
		            <a href="#flow-operate" aria-controls="messages" load-url="${pageContext.request.contextPath}/workflow/authority!toFlowOperate.action?appId=" role="tab" data-toggle="tab">
		            流程环节操作权限</a>
		        </li>
		        <li role="presentation" style="display:none">
		            <a href="#flow-remind" aria-controls="settings" load-url="${pageContext.request.contextPath}/workflow/app/flow-remind.jsp" role="tab" data-toggle="tab">
		            流程环节提醒方式</a>
		        </li>
		         <li role="presentation" style="display:none">
		            <a href="#flow-opinion" aria-controls="settings" load-url="${pageContext.request.contextPath}/workflow/app/flow-opinion.jsp" role="tab" data-toggle="tab">
		            流程环节增加意见方式</a>
		        </li>
		        <li role="presentation" style="display:none">
		            <a href="#config-flow-opinion" aria-controls="settings" load-url="${pageContext.request.contextPath}/workflow/app/config-flow-opinion.jsp" role="tab" data-toggle="tab">
		            配置流程环节意见</a>
		        </li>
		    </ul>
		
		    <!-- Tab panes -->
		    <div class="tab-content" style="padding:10px 0px;border:none">
		        <div role="tabpanel" class="tab-pane active" id="base-info"></div>
		        <div role="tabpanel" class="tab-pane" id="field-manage"></div>
		        <div role="tabpanel" class="tab-pane" id="form-template"></div>
		        <div role="tabpanel" class="tab-pane" id="field-auth"></div>
		        
		        <div role="tabpanel" class="tab-pane" id="flow-operate">5</div>
		        <div role="tabpanel" class="tab-pane" id="flow-remind">6</div>
		        <div role="tabpanel" class="tab-pane" id="flow-opinion">7</div>
		        <div role="tabpanel" class="tab-pane" id="config-flow-opinion">8</div>
		    </div>
		</div>
    </section>
</div>
<script>
	$(function(){
    	$(".nav-tabs a").click(function(){
			var targetDiv = $(this).attr("href");
	  		$.ajax({
				url : $(this).attr("load-url")+$("#appId").val(),
				async : false,
				type : "POST",
				success : function(page) {
					$(targetDiv).empty();
					$(targetDiv).append(page);
				}
			});
		});
		$(".nav-tabs a").first().click();
    })
</script>